<style>
	@import url('./numbermaze.css');
</style>
<template>
	<!-- 公共头部 -->
	<view> <my-header :title="'数字迷宫'" :lefticon="'left'"></my-header></view>
	<!-- 关卡选择 -->
	<view class="levelSelection" v-for="(item,index) in level_data" v-show="ifgame"   @click="selectgame(index)">
		<view :class="item.isopen==1 || item.isopen==2  ?'active':''">
			<view class="levelSelection_a">
				<view class="levelSelectiona">第{{index}}关</view>
				<view class="levelSelectionb"><text
						class="marginright">{{item.num}}*{{item.num}}</text>{{item.min_time}}分钟</view>
			</view>
			<view class="levelSelection_b" v-if="item.isopen==1"  @click="selectgame(index)">过关</view>
			<view class="levelSelection_b" v-else-if="item.isopen==2"   @click="selectgame(index)">已解锁</view>
			<view class="levelSelection_b" v-else>待解锁</view>
		</view>
	</view>



	<!-- 数字迷宫 -->
	<view v-show="!ifgame">
		<view class="body">
			<view class="projectexercisestwo_top_b" v-show="!ifshow">
				<view class="countdown"><text>{{langMatch.countdown}}：<text
							class="time">{{times}}:{{seconds}}</text></text>
				</view>
				<view @click="confirmsubmit()" class="confirmsubmit">提交</view>
			</view>
			<view class="contents">
				<view class="rattle">
					<view :index="item" @touchstart="clicknumber(item)" v-for="(item,index) in numberarr"
						:style="'width:'+proportion+'%'" class="grid-item-box">
						<view :class="'number'+item">
							<text class="text">{{item}}</text>
						</view>
					</view>
				</view>
			</view>
		</view>
		<!-- 遮罩 -->
		<view class="mask" v-show="ifshow || ifpass"></view>
		<view class="start" @click="startGame()" v-show="ifshow">
			<view>{{langMatch.start}}</view>
		</view>

		<view class="passTheResult" v-show="ifpass">
			<view class="passTheResultlevel">
				<view class="type-color">{{passtitle}}</view>

				<view class="zdy_border"><text>本题得分：</text>{{fraction}}分</view>
				<view><text>通关总数：</text>{{nowfrequency-1}}关</view>
				
				<view><text>本关用时：</text>{{thisLeveltime}}秒</view>
				<view><text>本关得分：</text>{{thisLevelfraction}}分</view>
				
				
				<!-- <view><text>实时名次：</text>暂无</view> -->
				<!-- 关卡 -->
				<view class="level" v-for="(item,index) in btn" @click="clickList(index)">
					<view class="text">{{item}}</view>
				</view>
			</view>
		</view>
	</view>

</template>
<script type="module" src="./numbermaze.js"></script>